package com.aode.register.viewmodel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.MutableLiveData;

import com.aode.common.bean.request.LoginData;
import com.aode.common.bean.response.User;
import com.aode.common.bean.web.Result;
import com.aode.register.repository.Repository;

public class RegisterViewModel extends AndroidViewModel {

    private Repository repository;
    public RegisterViewModel(@NonNull Application application) {
        super(application);
        repository = new Repository(application);
    }
    public void register(LoginData loginData){
        repository.register(loginData);
    }

    public MutableLiveData<Result> getRegisterLiveData(){
        return repository.getMutableLiveData();
    }
}
